package com.kunyi.web.im.websocket.core;

import com.kunyi.web.im.websocket.config.NacosClientRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName KyApplicationRunner
 * @Description 服务启动之后，注册nacos服务
 * @Author huangxiaoqin
 * @Date 2024/4/10 16:21
 * @Version 1.0
 */
@Component
public class KyApplicationRunner implements ApplicationRunner {

    @Autowired
    private NacosClientRegister nacosClientRegister;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        nacosClientRegister.registerService();
    }
}